<template>
	<div>
		<div v-if="flag == 1">
			<GoodsList :goodId="1"></GoodsList>
		</div>
		<div v-if="flag == 2">
			<GoodsList :goodId="2"></GoodsList>
		</div>
	</div>
</template>

<script>
	import Msg from './msg.js'
	import GoodsList from './GoodsList.vue'
	
	export default{
		data(){
			return {
				flag: 1
			}
		},
		mounted: function(){
			var _this = this;
			Msg.$on('val', function(m){
				_this.flag = m;
			})
		},
		components:{
			GoodsList
		}
	}
	
</script>

<style>
</style>
